package cn.changein.framework.util;

/**

 */
public class ThreadContextHolder {

    static ThreadLocal<Long> userId = new ThreadLocal<>();

    public static Long getUserId() {
        return userId.get();
    }

    public static void setUserId(Long userId) {
        ThreadContextHolder.userId.set(userId);
    }

    public static void remove() {
        userId.remove();
    }
}
